Skip to content

fix(group): require AMPAdmin for well project add/remove#737

Closed
jeremyzilar wants to merge 2 commits into
stagingfrom
fix/group-thing-amp-admin-permission
Closed

fix(group): require AMPAdmin for well project add/remove#737
jeremyzilar wants to merge 2 commits into
stagingfrom
fix/group-thing-amp-admin-permission

Conversation

@jeremyzilar

Copy link
Copy Markdown
Contributor

Summary

Preview and staging return 401 when AMP admins use the well edit panel to add or remove projects. The UI gates Edit to AMP.Admin, but the group thing association routes required the legacy global Admin JWT group.

Changes POST/DELETE /group/{group_id}/things/{thing_id} to use amp_admin_dependency instead of admin_dependency.

Test plan

  • uv run pytest tests/test_group.py -k thing_to_group -q
  • As an AMP.Admin user without global Admin, add a project on a well preview branch and confirm success
  • Confirm users without AMPAdmin still cannot call the routes

Well project add/remove is gated to AMP.Admin in the UI, but the API
routes checked the legacy Admin group. AMP admins without global Admin
got 401 Unauthorized on preview and staging.
@jeremyzilar jeremyzilar deleted the fix/group-thing-amp-admin-permission branch June 22, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant